//
//  EntityManager.h
//  GSEngine
//
//  Created by Александр on 02.02.14.
//  Copyright (c) 2014 SNK. All rights reserved.
//

#ifndef __GSEngine__EntityManager__
#define __GSEngine__EntityManager__

#include <iostream>
#include <vector>
#include "GSEntity.h"
#include "Camera.h"

namespace GSEngine
{
    class EntityManager
    {
    public:
        EntityManager();
        ~EntityManager();
        static EntityManager* getInstance();
        void render();
        void addObject(GSEntity* object);
        Camera* getCamera();
    protected:
        static EntityManager* m_instance;
    private:
        std::vector<GSEntity*> m_objects;
        Camera* m_camera;
    };
    inline EntityManager* EntityManager::getInstance()
    {
        if (m_instance == NULL)
            m_instance = new EntityManager();
        return m_instance;
    }
}
#endif /* defined(__GSEngine__EntityManager__) */
